package com.LearnInWorld.es.pojo;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

@Data
@Document(indexName = "learninworld_videoinfo", type = "doc")
public class VideoInfo implements Serializable {
    @Id
    @Field(index = true, store = true, type = FieldType.Keyword)
    private Long id;//视频id

    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String videoName;//视频名称

    @Field(index = true, store = true, type = FieldType.Text)
    private String image;//视频图片

    @Field(index = true, store = true, type = FieldType.Text)
    private String images;//视频图片列表

    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String videoIntroduce;//视频介绍

    @Field(index = true,store = true,type = FieldType.Date)
    private Date timetableUpTime;//上传日期

    @Field(index = true, store = true, type = FieldType.Long)
    private Long videoUpUser;//视频上传者id

    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String timetableType;//视频类型

    @Field(index = true, store = true, type = FieldType.Long)
    private Long playNum;//播放次数

    @Field(index = true, store = true, type = FieldType.Long)
    private Long commentNum;//评论次数

    @Field(index = true, store = true, type = FieldType.Long)
    private Long size;//视频大小

    @Field(index = true, store = true, type = FieldType.Long)
    private Long collectNum;//收藏次数

    @Field(index = true, store = true, type = FieldType.Long)
    private Long supportNum;//支持数

    @Field(index = true, store = true, type = FieldType.Long)
    private Long opposeNum;//踩数

    @Field(index = true, store = true, type = FieldType.Text)//视频url
    private String timetableUrl;
}
